[XEND] Currently a domain's maxmem value is being set with the memory value
authorkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Mon, 10 Jul 2006 14:57:56 +0000 (15:57 +0100)
committerkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Mon, 10 Jul 2006 14:57:56 +0000 (15:57 +0100)
even if the user specifies maxmem in config.  This patch uses maxmem
value to set maxmem instead of memory.

Signed-off-by: Ryan Harper <ryanh@us.ibm.com>
tools/python/xen/xend/XendDomainInfo.py

index b100a7d5579759df6b5f3cb0b5c4c4bb4a06a588..5ded5537b3e29d27510070b359bf130765da1752 100644 (file)
@@ -1302,9 +1302,11 @@ class XendDomainInfo:
                     cpu = [ int( cpus[v % len(cpus)] ) ]
                     xc.vcpu_setaffinity(self.domid, v, cpu)
 
+            # set domain maxmem in KiB
+            xc.domain_setmaxmem(self.domid, self.info['maxmem'] * 1024)
+
             m = self.image.getDomainMemory(self.info['memory'] * 1024)
             balloon.free(m)
-            xc.domain_setmaxmem(self.domid, m)
 
             init_reservation = self.info['memory'] * 1024
             if os.uname()[4] == 'ia64':